<template>
    <el-dialog
            :center="true"
            :show-close="true"
            :visible="show"
            @close="close"
            lock-scroll
            title="机构信息"
            @open="open"
    >
        {{info}}

        {{user}}
    </el-dialog>
</template>

<script>
    export default {
        name: "index",
        props : {
            show : {
                type : Boolean,
                default : false,
            },
            info : {
                type : Object,
            }
        },
        data(){
            return {
                user : {}, // 该机构的负责人
            }
        },
        methods : {
            close(){
                this.$emit("close")
            },
            open(){
                this.$api.user.userId(this.info.userId)
                    .then(response => {
                        this.user = response.data[0]
                    })
            }
        }
    }
</script>

<style scoped>

</style>
